home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 February: Tool Chest / Dev.CD Feb 94.toast / Utilities / Installer v3.4.3 / Installer 3.4 Interfaces / InstallerTypes.r < prev   
Encoding:
Text File  |  1993-06-15  |  23.4 KB  |  718 lines  |  [TEXT/MPS ]

  1. /*
  2.     LEGALESE:    © 1988-1990 Apple Computer, Inc.  All Rights Reserved
  3.     
  4.     PROJECT:    Installer 3.3
  5.     
  6.     PROGRAM:    Installer
  7.     
  8.     AUTHORS:    Bruce Jones, Cindy Frost, Bobby Carp
  9.     
  10.     PURPOSE:    This file contains all the resource templates necessary to
  11.                 create installer scripts.
  12.  
  13.     CHANGE HISTORY (most recent first):
  14.  
  15.         <28>     6/16/91    KBA        Add defines for resource attributes.  Removed 2nd version of
  16.         <27>     5/14/91    KBA        Added flag to Format1 for stopping cursors during action atom.
  17.                                     Created 2nd version inra with split resource info.
  18.         <26>     4/18/91    KBA        Moved to new project InstallerTypes. Added 'inff' template for
  19.                                     installing split font resources.
  20.         <25>     1/15/91    BAC        Changing project to Installer 3.2.
  21.         <24>     1/10/91    BAC        Adding the type definition for the 'invs' required Installer
  22.                                     application version resource.
  23.         <22>     12/6/90    BAC        Changing 'alwaysCopy' (opposite of updateOnly) to something that
  24.                                     doesn't semantically conflict with keepExisting.
  25.         <21>     12/5/90    BKJ        Clean up capitalization as per Jon Zap's request.
  26.         <20>    11/27/90    BKJ        Let scriptwriters have control of when an installation requires
  27.                                     a restart. This means adding the dontForceRestart/forceRestart
  28.                                     flag to packages.
  29.         <19>     11/2/90    BAC        We need to define REGION for people who are using pre-7.0
  30.                                     interfaces.
  31.         <18>     11/2/90    BKJ        Fix typos
  32.         <17>      9/3/90    BAC        Added the LONGINT refCon field to the 'inaa' and
  33.                                     checkUserFunction definitions.
  34.         <15>      8/1/90    BKJ        Fixing bug in indo resource template
  35.         <14>     7/28/90    BKJ        Add AlwaysTrue key resource type
  36.                  7/13/90    BKJ        Fixing Format for the Facist Nazi Header stuff
  37.                  4/27/90    BKJ        Cleaned up for Developer's Conference release.  Removed all old
  38.                                     Default Maps stuff.
  39.                   4/5/90    BKJ        Added 3 new clause types - reportError, addAuditRecord, checkAuditRecord
  40.                  2/14/90    BKJ        Added 'indo' template for ordering disks.  (Happy Valentine's Day)
  41.                  12/2/89    BKJ        Changed format1 default maps to rules & default maps
  42.                                     groups to rule frameworks
  43.                  9/12/89    BKJ        Made major changes for support of format1 default maps
  44.                  9/12/89    BKJ        Changed 'indg' to support a list of IDs rather than a range
  45.                  9/12/89    CIF        Added types for Installer action atoms
  46.                  9/11/89    BKJ        Added types for default map groups
  47.                  9/11/89    BKJ        Forked off of 6.0.4 final
  48.                  7/25/89    BKJ        Added support for international keyboards
  49.                  2/17/89            ALPHA 7 Release
  50.                  1/12/89            ALPHA 6 Release
  51.                 12/19/88            ALPHA 5
  52.                  5/26/88    CIF        Created
  53.                  9/14/88            ALPHA 2 Release
  54. */
  55.  
  56.  
  57. #include "SysTypes.r"                                    /* For region codes */
  58.  
  59. /* For those using pre-7.0 "SysTypes.r" we need to define region.  It used */
  60. /* to be country, but became region in 7.0 */
  61.  
  62. #ifndef region
  63. #define region country
  64. #endif
  65.  
  66.  
  67. /*----------------------------Installer 3.0 Scripts-----------------------------------*/
  68.  
  69. #define evenPaddedString                                                                                        \
  70.     pstring;                                                                                                    \
  71.     align word
  72.  
  73.  
  74. #define OSType                                                                                                    \
  75.     literal longint
  76.     
  77.     
  78. #define rsrcType                                                                                                \
  79.     OSType                                                /* type of a rsrc which must exist in system */            \
  80.         patchrsrcType = 'PTCH',                                                                                    \
  81.         userFunctionType = 'infn',                                                                                \
  82.         auditrsrcType = 'audt'
  83.  
  84.  
  85. #define rsrcID                                                                                                    \
  86.     integer                                                /* ID of a rsrc which must exist in system */            \
  87.         macPlusPatch = 117,                                                                                        \
  88.         macSEPatch = 630,                                                                                        \
  89.         macIIPatch = 376,                                                                                        \
  90.         portablePatch = 890,                                                                                    \
  91.         macIIciPatch = 1660,                                                                                    \
  92.         oldAuroraPatch = 1657
  93.  
  94.  
  95. #define RsrcName                                                                                                \
  96.     evenPaddedString
  97.  
  98. /*
  99. § --------------------------------- Packages ---------------------------------*/
  100. #define    packageFlags                                                                                             \
  101.         boolean        doesntShowOnCustom, showsOnCustom;        /* should show up on Custom screen     */                \
  102.         boolean        notRemovable, removable;                /* this package can be removed     */                    \
  103.         boolean        forceRestart, dontForceRestart;            /* should installing this package for a restart? */    \
  104.         fill bit[13]                                        /* Reserved */ 
  105. #define    notShowsOnCustom    doesntShowOnCustom                /* Old wording */
  106.  
  107. #define    partSpec                                                                                                \
  108.         rsrcType;                                            /* Part Type: inpk, infa, inra… */                 \
  109.         rsrcID                                                /* Part ID */
  110.  
  111.  
  112. type 'inpk' {
  113.         switch {
  114.             case format0:
  115.                 key integer = 0;                            /* Package Format version */
  116.                 packageFlags;                                /* Package Flags */
  117.                 unsigned integer;                            /* icmt ID */
  118.                 unsigned longint;                            /* Package Size */
  119.                 evenPaddedString;                            /* Package Name */
  120.                 unsigned integer = $$CountOf(partsList);    /* Parts List */
  121.                 wide array partsList {
  122.                     partSpec;                                /* Parts Spec */
  123.                 };
  124.     
  125.         };
  126. };
  127.  
  128.  
  129. type 'icmt' {                                                /* Installer comment */
  130.         unsigned hex longint;                                /* Creation Date  */
  131.         unsigned hex longint;                                /* Version */
  132.         rsrcID;                                                /* Icon ID */
  133.         evenPaddedString;                                    /* Comment Text */
  134. };
  135.  
  136. /*
  137. § --------------------------------- File Specs ---------------------------------*/
  138. #define fileSpecID                                                                                                \
  139.         rsrcID
  140.  
  141.  
  142. #define    fileSpecFlags                                                                                            \
  143.         boolean        noSearchForFile, SearchForFile;            /* Search (tgt only) if not found in given path*/    \
  144.         boolean        TypeCrNeedNotMatch, TypeCrMustMatch;    /* Type and creator must match    */                    \
  145.         fill bit[14]                                        /* currently unused    */
  146. #define    noTypeCrMustMatch    TypeCrNeedNotMatch
  147.  
  148. type    'infs' {                                                        
  149.         literal longint;                                    /* File Type    */
  150.         literal longint;                                    /* File Creator    */
  151.         unsigned hex longint;                                /* Creation Date*/ 
  152.         fileSpecFlags;                                        /* File Spec Flags */
  153.         evenPaddedString;                                    /* Full Path */
  154. };
  155.  
  156. /*
  157. § --------------------------------- File Atoms ---------------------------------*/
  158. #define    opcodeFlags                                                                                             \
  159.         boolean        dontDeleteWhenRemoving, deleteWhenRemoving;            /* Remove file or rsrc if remove clicked */    \
  160.         boolean        dontDeleteWhenInstalling, deleteWhenInstalling;        /* Delete target before copy    */            \
  161.         boolean        dontCopy, copy;                            /* Copy file or rsrc to destination */                \
  162.         fill bit[3]                                            /* Reserved */
  163. #define    delRemove        deleteWhenRemoving
  164. #define    noDelRemove        dontDeleteWhenRemoving
  165. #define    delInstall        deleteWhenInstalling
  166. #define    noDelInstall    dontDeleteWhenInstalling
  167. #define    noCopy            dontCopy
  168.  
  169.  
  170. #define    fileAtomFlags                                                                                            \
  171.         opcodeFlags;                                                                                            \
  172.         fill bit[5];                                                                                             \
  173.         boolean        updateEvenIfNewer, leaveAloneIfNewer;     /* OK for a newer version of this file to exist */    \
  174.         boolean        updateExisting, keepExisting;            /* Keep tgt file if it already exists */            \
  175.         boolean        copyIfNewOrUpdate, copyIfUpdate;        /* Only update if target exists    */                    \
  176.         boolean        noRsrcFork, rsrcFork;                    /* Apply operation to rsrc fork */                    \
  177.         boolean        noDataFork, dataFork                    /* Apply operation to data fork    */
  178. #define    noLeaveAloneIfNewer    updateEvenIfNewer
  179. #define    noKeepExisting        updateExisting
  180. #define    noUpdateOnly        copyIfNewOrUpdate
  181. #define updateOnly            copyIfUpdate
  182.  
  183.  
  184. type 'infa' {
  185.         switch {
  186.             case format0:
  187.                 key integer = 0;                            /* File Atom Format version */
  188.                 fileAtomFlags;                                /* File Atom Flags          */
  189.                 rsrcID;                                        /* tgt file spec ID */
  190.                 rsrcID;                                        /* src file spec ID */
  191.                 unsigned longInt;                            /* File Size     */
  192.                 evenPaddedString;                            /* Atom Description     */
  193.         };
  194. };
  195.  
  196. /*
  197. § -------------------------------- Resource Atoms ---------------------------------*/
  198. #define    resourceAtomFlags                                                                                        \
  199.         opcodeFlags;                                                                                            \
  200.         fill bit[3];                                        /* Reserved    */                                        \
  201.         boolean        noTgtRequired, tgtRequired;                /* target req or can be created by another inra */    \
  202.         boolean        updateExisting, keepExisting;            /* Keep tgt rsrc if it already exists */            \
  203.         boolean        copyIfNewOrUpdate, copyIfUpdate;        /* Only update if target exists    */                    \
  204.         boolean        dontIgnoreProtection, ignoreProtection;    /* Do it even if rsrc protected */                    \
  205.         boolean        srcNeedExist, srcNeedNotExist;            /* Rsrc need not exist on source */                    \
  206.         boolean        byName, byID;                            /* Use name or id to find rsrc    */                    \
  207.         boolean        nameNeedNotMatch, nameMustMatch            /* name must match*/
  208. #define    evenIf                ignoreProtection
  209. #define    noEvenIf            dontIgnoreProtection
  210. #define    noByID                byName
  211. #define    notNameMustMatch    nameNeedNotMatch
  212.  
  213. type 'inra' {
  214.         switch {
  215.             case format0:
  216.                 key integer = 0;                            /* Resource Atom Format version */
  217.                 resourceAtomFlags;                            /* Resource Atom Flags */
  218.                 rsrcID;                                        /* tgt file spec ID */
  219.                 rsrcID;                                        /* src file spec ID */
  220.                 rsrcType;                                    /* Resource Type */
  221.                 integer;                                    /* Source ID */
  222.                 integer;                                    /* Target ID */
  223.                 unsigned longInt;                            /* Resource Size */
  224.                 evenPaddedString;                            /* Atom Description */
  225.                 evenPaddedString;                            /* Resource Name */
  226.         };
  227. };
  228. /*
  229. § --------------------------------- Boot Block Atoms ---------------------------------*/
  230. #define    bootBlockAtomFlags                                                                                        \
  231.         fill bit[14];                                                                                            \
  232.         boolean        dontChangeOnInstall, changeOnInstall;    /* change parameter if we're installing */            \
  233.         boolean        dontChangeOnRemove, changeOnRemove        /* change parameter if we're removing */ 
  234. #define    notChangeOnInstall    dontChangeOnInstall
  235. #define    notChangeOnRemove    dontChangeOnRemove
  236.  
  237. #define    BootBlockUpdateFlags                                                                                    \
  238.         fill bit[7];                                                                                            \
  239.         boolean        replaceBBSysName,                                                                             \
  240.                     saveBBSysName;                                                                                 \
  241.         boolean        replaceBBShellName,                                                                         \
  242.                     saveBBShellName;                                                                            \
  243.         boolean        replaceBBDbg1Name,                                                                             \
  244.                     saveBBDbg1Name;                                                                             \
  245.         boolean        replaceBBDbg2Name,                                                                             \
  246.                     saveBBDbg2Name;                                                                             \
  247.         boolean        replaceBBScreenName,                                                                         \
  248.                     saveBBScreenName;                                                                             \
  249.         boolean        replaceBBHelloName,                                                                         \
  250.                     saveBBHelloName;                                                                             \
  251.         boolean        replaceBBScrapName,                                                                            \
  252.                     saveBBScrapName;                                                                             \
  253.         boolean        replaceBBCntFCBs,                                                                             \
  254.                     maxBBCntFCBs;                                                                                 \
  255.         boolean        replaceBBCntEvts,                                                                             \
  256.                     maxBBCntEvts
  257.  
  258.  
  259. type 'inbb' {
  260.         switch {
  261.             case format0:
  262.                 key integer = 0;                            /* Boot Block Format version */
  263.                 bootBlockAtomFlags;                            /* Boot Block Atom Flags      */
  264.                         
  265.                         /* now case off the type for the boot block value */
  266.                 switch {
  267.                     case bbUpdate:
  268.                         key integer = -1;
  269.                         rsrcID;                                /* The file spec ID for the source of the 'boot' resource */
  270.                         bootBlockUpdateFlags;
  271.                         
  272.                     case bbID:
  273.                         key integer = 1;
  274.                         decimal integer;
  275.                     
  276.                     case bbEntry:
  277.                         key integer = 2;
  278.                         decimal longint;
  279.                         
  280.                     case bbVersion:
  281.                         key integer = 3;
  282.                         decimal integer;
  283.                         
  284.                     case bbPageFlags:
  285.                         key integer = 4;
  286.                         decimal integer;
  287.                         
  288.                     case bbSysName:
  289.                         key integer = 5;
  290.                         evenPaddedString;
  291.                         
  292.                     case bbShellName:
  293.                         key integer = 6;
  294.                         evenPaddedString;
  295.                         
  296.                     case bbDbg1Name:
  297.                         key integer = 7;
  298.                         evenPaddedString;
  299.                         
  300.                     case bbDbg2Name:
  301.                         key integer = 8;
  302.                         evenPaddedString;
  303.                         
  304.                     case bbScreenName:
  305.                         key integer = 9;
  306.                         evenPaddedString;
  307.                         
  308.                     case bbHelloName:
  309.                         key integer = 10;
  310.                         evenPaddedString;
  311.                         
  312.                     case bbScrapName:
  313.                         key integer = 11;
  314.                         evenPaddedString;
  315.                         
  316.                     case bbCntFCBs:
  317.                         key integer = 12;
  318.                         decimal integer;
  319.                         
  320.                     case bbCntEvts:
  321.                         key integer = 13;
  322.                         decimal integer;
  323.                         
  324.                     case bb128KSHeap:
  325.                         key integer = 14;
  326.                         decimal longint;
  327.                         
  328.                     case bb256KSHeap:
  329.                         key integer = 15;
  330.                         decimal longint;
  331.                         
  332.                     case bb512KSHeap:
  333.                         key integer = 16;
  334.                         decimal longint;
  335.                         
  336.                     case bbSysHeapSize:                        /* Note - same as 512 */
  337.                         key integer = 16;
  338.                         decimal longint;
  339.                         
  340.                     case bbSysHeapExtra:
  341.                         key integer = 18;
  342.                         decimal longint;
  343.                         
  344.                     case bbSysHeapFract:
  345.                         key integer = 19;
  346.                         decimal longint;
  347.                 };
  348.                 evenPaddedString;                                /* Boot Block Atom Description */
  349.         };
  350. };
  351.  
  352.  
  353. /*
  354. § --------------------------------- Action Atoms ---------------------------------*/
  355.  
  356. #define    whenToActAAFlags                                                                                    \
  357.         boolean        actAfter,                /* Call this proc after all installations */                    \
  358.                     actBefore;                /* Call this proc before all installations */                    \
  359.         boolean        dontActOnRemove,                                                                         \
  360.                     actOnRemove;            /* Call this proc when doing a remove */                        \
  361.         boolean        dontActOnInstall,                                                                         \
  362.                     actOnInstall            /* Call this proc when doing an Install */
  363.  
  364.  
  365. #define    actionAtomFlagsFormat0                                                                                \
  366.         fill bit[13];                                                                                        \
  367.         whenToActAAFlags
  368.  
  369. #define    actionAtomFlagsFormat1                                                                                \
  370.         fill bit[12];                                                                                         \
  371.         boolean        continueBusyCursors,    /* Allow Installer busy cursor during call (3.3+ Only) */        \
  372.                     suspendBusyCursors;        /* Stop Installer busy cursor before call (3.3+ Only) */        \
  373.         whenToActAAFlags
  374.  
  375. type 'inaa' {
  376.         switch {
  377.             case format0:
  378.                 key integer = 0;            /* Action Atom Format version */
  379.                 actionAtomFlagsFormat0;        /* Action Atom Flags for Format 0 */
  380.                 partSpec;                    /* Resource type & id for executable resource */
  381.                 longint;                    /* RefCon that's passed to the executable resource */
  382.                 evenPaddedString;            /* Atom Description     */
  383.                 
  384.             case format1:
  385.                 key integer = 1;            /* Action Atom Format version.  Use with Installer 3.3 and newer */
  386.                 actionAtomFlagsFormat1;        /* Action Atom Flags for Format 1 */
  387.                 partSpec;                    /* Resource type & id for executable resource */
  388.                 longint;                    /* RefCon that's passed to the executable resource */
  389.                 evenPaddedString;            /* Atom Description     */
  390.         };
  391. };
  392.  
  393. /*
  394. § --------------------------------- Audit Trail Atoms ---------------------------------*/
  395. type 'inat' {
  396.         switch {
  397.             case format0:
  398.                 key integer = 0;                            /* Version */
  399.                 fileSpecID;                                    /* Target File Spec */
  400.                 OSType;                                        /* Selector */
  401.                 literal longint;                            /* Value */
  402.             };
  403. };
  404.  
  405. /*
  406. § --------------------------------- Installer Rules ---------------------------------*/
  407.  
  408. #define Version                                                                                                    \
  409.     hex byte;                                                /* System file Major revision in BCD*/                \
  410.     hex byte;                                                /* System file Minor revision in BCD*/                \
  411.     hex byte    development = 0x20,                            /* System file Release stage        */                \
  412.                 alpha = 0x40, beta = 0x60,                                                                        \
  413.                 final = 0x80, release = 0x80;                                                                    \
  414.     hex byte                                                /* Non Final */
  415.     
  416.     
  417. /* Note that if the minimal & maximal target disk sizes are both 0, any volume will match */
  418. /* If the Minimal is > 0 and the maximal = 0, then only the minimum requirement is used */
  419. #define TargetVolReqs                                        /* Required Target Volume Description */            \
  420.     decimal longint                                            /* Minimal Target Disk Size */                        \
  421.         floppy = 0,                                                                                                \
  422.         hdFloppy = 1400,                                                                                        \
  423.         hardDisk = 10000;                                                                                        \
  424.     decimal longint                                            /* Maximal Target Disk Size */                        \
  425.         floppy = 900,                                                                                            \
  426.         hdFloppy = 1500,                                                                                        \
  427.         hardDisk = 0
  428.     
  429.     
  430. #define IntegerList                                                                                                \
  431.     unsigned integer = $$CountOf(IntegerArray);                                                                    \
  432.     array IntegerArray {                                                                                        \
  433.         integer;                                                                                                \
  434.     }
  435.  
  436.  
  437. #define LongIntList                                                                                                \
  438.     unsigned integer = $$CountOf(LongIntArray);                                                                    \
  439.     array LongIntArray {                                                                                        \
  440.         longint;                                                                                                \
  441.     }
  442.  
  443.  
  444. #define packageList                                                                                                \
  445.     IntegerList
  446.  
  447.  
  448. #define assertionList                                                                                            \
  449.     IntegerList
  450.     
  451.     
  452. #define gestaltList                                                                                                \
  453.     LongIntList
  454.  
  455.  
  456. #define    alwaysFalseKey                            -2
  457. #define    alwaysTrueKey                            -1
  458. #define    checkGestaltKey                            1
  459. #define checkMinMemoryKey                        2
  460. #define    checkFileDataForkExistsKey                3
  461. #define    checkFileRsrcForkExistsKey                4
  462. #define    checkFileContainsRsrcByIDKey            5
  463. #define    checkFileContainsRsrcByNameKey            6
  464. #define    checkFileVersionKey                        7
  465. #define    checkFileCountryCodeKey                    8
  466. #define    checkTgtVolSizeKey                        9
  467. #define    checkUserFunctionKey                    10
  468. #define    checkAllAssertionsKey                    11
  469. #define    checkAnyAssertionKey                    12
  470. #define checkMoreThanOneAssertionKey            13
  471. #define    addUserDescriptionKey                    14
  472. #define    addPackagesKey                            15
  473. #define    addAssertionKey                            16
  474. #define reportVolErrorKey                        17
  475. #define reportSysErrorKey                        18
  476. #define addAuditRecKey                            19
  477. #define checkAuditRecKey                        20
  478. #define checkAnyAuditRecKey                        21
  479.  
  480.  
  481.  
  482. /* The Easy Install Rules */
  483. type 'inrl' {
  484.     switch {
  485.         case format0:
  486.             key integer = 0;
  487.             hex integer = 0;                                            /* Rule Flags for future use */
  488.             unsigned integer = $$CountOf(Rules);
  489.             wide array Rules {
  490.                 switch {
  491.                     case alwaysFalse:
  492.                         key integer = alwaysFalseKey;
  493.                         
  494.                     case alwaysTrue:
  495.                         key integer = alwaysTrueKey;
  496.                         
  497.                     case checkGestalt:
  498.                         key integer = checkGestaltKey;
  499.                         OSType;                                            /* Gestalt selector */
  500.                         gestaltList;                                    /* Legal results */
  501.                     
  502.                     case checkMinMemory:
  503.                         key integer = checkMinMemoryKey;
  504.                         decimal longint;
  505.  
  506.                     case checkFileDataForkExists:
  507.                         key integer = checkFileDataForkExistsKey;
  508.                         fileSpecID;
  509.                         
  510.                     case checkFileRsrcForkExists:
  511.                         key integer = checkFileRsrcForkExistsKey;
  512.                         fileSpecID;
  513.                         
  514.                     case checkFileContainsRsrcByID:
  515.                         key integer = checkFileContainsRsrcByIDKey;
  516.                         fileSpecID;
  517.                         rsrcType;
  518.                         rsrcID;
  519.                         
  520.                     case checkFileContainsRsrcByName:
  521.                         key integer = checkFileContainsRsrcByNameKey;
  522.                         fileSpecID;
  523.                         rsrcType;
  524.                         rsrcName;
  525.                         
  526.                     case checkFileVersion:
  527.                         key integer = checkFileVersionKey;
  528.                         fileSpecID;
  529.                         version;
  530.                         
  531.                     case checkFileCountryCode:
  532.                         key integer = checkFileCountryCodeKey;
  533.                         fileSpecID;
  534.                         integer Region;
  535.                         
  536.                     case checkTgtVolSize:
  537.                         key integer = checkTgtVolSizeKey;
  538.                         targetVolReqs;
  539.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
  540.                     case checkUserFunction:
  541.                         key integer = checkUserFunctionKey;
  542.                         rsrcType;
  543.                         rsrcID;
  544.                         longint;                    /* RefCon that's passed to the executable resource */
  545.                         
  546.                     case checkAllAssertions:
  547.                         key integer = checkAllAssertionsKey;
  548.                         assertionList;
  549.                         
  550.                     case checkAnyAssertion:
  551.                         key integer = checkAnyAssertionKey;
  552.                         assertionList;
  553.                         
  554.                     case checkMoreThanOneAssertion:
  555.                         key integer = checkMoreThanOneAssertionKey;
  556.                         assertionList;
  557.                         
  558.                     case addUserDescription:
  559.                         key integer = addUserDescriptionKey;
  560.                         evenPaddedString;
  561.                         
  562.                     case addPackages:
  563.                         key integer = addPackagesKey;
  564.                         packageList;
  565.                         
  566.                     case addAssertion:
  567.                         key integer = addAssertionKey;
  568.                         assertionList;
  569.                         
  570.                     case reportVolError:
  571.                         key integer = reportVolErrorKey;
  572.                         evenPaddedString;
  573.                         
  574.                     case reportSysError:
  575.                         key integer = reportSysErrorKey;
  576.                         evenPaddedString;
  577.                         
  578.                     case addAuditRec:
  579.                         key integer = addAuditRecKey;
  580.                         fileSpecID;
  581.                         OSType;
  582.                         literal longint;
  583.                         
  584.                     case checkAuditRec:
  585.                         key integer = checkAuditRecKey;
  586.                         fileSpecID;
  587.                         OSType;
  588.                         literal longint;
  589.                         
  590.                     case checkAnyAuditRec:
  591.                         key integer = checkAnyAuditRecKey;
  592.                         fileSpecID;
  593.                         OSType;
  594.                         longIntList;
  595.                         
  596.             };
  597.         };
  598.     };
  599. };
  600.  
  601.  
  602. #define RuleList IntegerList
  603.     
  604. /* The rule framework */
  605. type 'infr' {
  606.     switch {
  607.         case format0:
  608.             key integer = 0;                                /* Rule framework version */
  609.             unsigned integer = $$CountOf(RuleArray);
  610.             wide array RuleArray {
  611.                 boolean pickFirst, pickAll;                    /* which packages to select? */                        
  612.                 fill bit[15];
  613.                 ruleList;                                    /* List of rules */                                    
  614.             };
  615.     };
  616. };
  617.  
  618.  
  619. /* The list of disks we may need, and the order we want them to appear in */
  620. /* This is optional. */
  621. type 'indo' {
  622.     switch {
  623.         case format0:
  624.             key integer = 0;                                /* indo version */
  625.             integer = $$Countof(StringArray);
  626.             array StringArray {
  627.                     evenPaddedString;
  628.             };
  629.     };
  630. };
  631.  
  632.  
  633. /* This script resource defines the minimum Installer version that is required */
  634. /* to run the script.  If an Installer app is launched that is older than this */
  635. /* required version, the user receives a dialog telling him/her to run a newer Installer */
  636. /* This is optional. */
  637. type 'invs' {
  638.     switch {
  639.         case format0:
  640.             key integer = 0;
  641.             hex byte;                                                /* Major revision in BCD*/
  642.             hex byte;                                                /* Minor vevision in BCD*/
  643.             hex byte    development = 0x20,                            /* Release stage        */
  644.                         alpha = 0x40,
  645.                         beta = 0x60,
  646.                         final = 0x80, /* or */ release = 0x80;
  647.             hex byte;                                                /* Non-final release #    */
  648.             pstring;                                                /* Short version number    */
  649.     };
  650. };
  651.  
  652.  
  653.  
  654. /*
  655. § -------------------------------- Font Atom & Split Atom Stuff ---------------------------------*/
  656.  
  657. #define    Style                                                                                    \
  658.     fill bit[9];                                        /* Reserved */                            \
  659.     Boolean        noExtendedStyle, extendedStyle;            /* Exteneded style */                    \
  660.     Boolean        noCondensedStyle, condensedStyle;        /* Condensed style */                    \
  661.     Boolean        noShadowStyle,     shadowStyle;            /* Shadow style */                        \
  662.     Boolean        noOutlineStyle, outlineStyle;            /* Outline style */                        \
  663.     Boolean        noUnderlineStyle, underlineStyle;        /* Underline style */                    \
  664.     Boolean        noItalicStyle, italicStyle;                /* Italic style */                        \
  665.     Boolean        noBoldStyle, boldStyle;                    /* Bold style */
  666.  
  667. #define    RsrcSpec                                                                                \
  668.         fileSpecID;                                        /* File spec for this resource */        \
  669.         rsrcType;                                        /* Type of the resource    */                \
  670.         rsrcID;                                            /* ID of the resource */                \
  671.         unsigned longInt;                                /* Size in bytes of this resource    */    \
  672.         evenPaddedString                                /* Name of the resource */                
  673.  
  674. #define    SrcPartsList                                    /* The list of pieces */                \
  675.         integer = $$CountOf (Parts);                    /* How many of them? */                    \
  676.         wide array Parts {                                                                        \
  677.             RsrcSpec;                                    /* Description of this piece */            \
  678.         }
  679.  
  680. #define resSysHeap        64                                /* Defines for resource attributes */
  681. #define resPurgeable    32
  682. #define resLocked        16
  683. #define resProtected    8
  684. #define resPreload        4
  685. #define resChanged        2
  686.  
  687. #define Strike                                                                                    \
  688.     integer;                                            /* Font size */                            \
  689.     Style;                                                /* Which styles? */                        \
  690.     RsrcType;                                            /* Target Font Resource Type */            \
  691.     integer;                                            /* Target Attributes */                    \
  692.     SrcPartsList;                                        /* All of the pieces */
  693.     
  694. type 'inff' {
  695.     switch {
  696.         case format0:
  697.             key integer = 0;                            /*format version 0 */
  698.             resourceAtomFlags;                            /* flags */
  699.             fileSpecID;                                    /* Target File Spec */
  700.             fileSpecID;                                    /* Source File Spec of the FOND and all pieces, unless overriden by a split definition */
  701.             integer;                                    /* Target FOND Attributes */
  702.             unsigned longInt;                            /* size in bytes of the complete family set */
  703.             rsrcID;                                        /* source FOND's resource ID */
  704.             switch {
  705.             case entireFamily:
  706.                  key integer = 1;
  707.             case explicitFamilyMembers:
  708.                 key integer = 2;
  709.                 unsigned integer = $$CountOf(StrikeEntries);
  710.                 wide array StrikeEntries {
  711.                     Strike;                                /* Source for each of the points */
  712.                 };
  713.             };
  714.             evenPaddedString;                            /* Atom Description */
  715.             evenPaddedString;                            /* the exact family name */
  716.     };
  717. };
  718.